package org.cloud.automatic.queue.job;

import lombok.extern.slf4j.Slf4j;
import org.cloud.automatic.queue.entity.SendQueueWorkerBO;
import org.cloud.automatic.queue.service.SendQueueDealService;
import org.cloud.automatic.util.SpringUtil;


@Slf4j
public class SendQueueWorker extends Worker  {
	
    /**
     * 补偿任务执行，每次执行就开启新的事务。
     */
    @Override
    public void handle(SendQueueWorkerBO sendQueueWorkerBO) {
        try {
           SendQueueDealService service = SpringUtil.getBean(SendQueueDealService.class);
           service.indepDealWork(sendQueueWorkerBO);
        }catch (Exception e) {
            log.error("===自动任务事务补偿失败===", e);
        }
    }

}
